
<!DOCTYPE html>
<!--[if lte IE 9]><html class="lt-ie10 lt-ie9" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if gt IE 9]><!-->
<html>
<!--<![endif]-->

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>赛尔（赛er）——大学生竞赛成长活动社区</title>
  <meta name="keywords" content="赛尔（赛er）是一个面向全国各大高校大学生的一站式社区平台，集竞赛活动发布和讨论为一体，提供发布、查询、组队、经验分享等多元化服务。" />
  <meta name="description"
        content="平台聚合了国内各大高校的校内比赛以及国内外各领域最优质的赛事活动信息。赛事内容囊括创新创业、演讲辩论、财会金融、艺术设计、学科竞赛、公益志愿等众多领域。赛尔（赛er）致力于打造一个融合大学生学习、赛事、活动、保研、考研等为一体的成长交流空间。" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta http-equiv="Access-Control-Allow-Origin" content="*" />
  <meta name="renderer" content="webkit">
  <link rel="stylesheet" type="text/css" href="static/css/top-4.9.6.2.min.css">
  <link rel="stylesheet" type="text/css" href="static/css/index-4.9.6.min.css">
  <script src="common/common.js"></script>

  <style>
    .item{
      cursor: pointer;
    }
    .layui-col-xs6{
      display: flex!important;
      justify-content: center;
    }
  </style>
</head>

<body>
<!--<div style="display:none;position:absolute;left:0;top:0;">-->
<!--  <img src="static/picture/wechat_share_icon.png" id="weChatShareIcon">-->
<!--</div>-->
<!--body-wrap-->
<div class="body-wrap" id="app">
  <div class="body-main main-wrap " style="padding-bottom: 0px">
    <ul class="layui-nav layui-bg-cyan" style="margin: 0 auto;padding:0 12%" lay-filter="">
      <li style="display: inline-block;line-height: 60px;vertical-align: middle;position: relative;"><a href="/index.html"><img style="height: 60px;margin-right: 15px" src="/static/images/logo.png"></a></li>
      <!-- 选中 加上 layui-this -->
      <li class="layui-nav-item layui-this"><a href="/index.html">首页</a></li>
      <li class="layui-nav-item"><a href="/competition/competition.html">竞赛</a></li>
      <li class="layui-nav-item"><a href="/activity/activity.html">活动</a></li>
      <li class="layui-nav-item"><a href="/ask/ask.html">论坛</a></li>
      <li class="layui-nav-item"><a href="/article/article.html">文章</a></li>
      <li class="layui-nav-item" v-if="user!=''&&user!=null&&user!=undefined">
        <a href="javascript:;">发布</a>
        <dl class="layui-nav-child">
          <!-- 二级菜单 -->
          <dd><a href="/competition/publish_competition.html">创建竞赛</a></dd>
          <dd><a href="/activity/publish_activity.html">发布活动</a></dd>
          <dd><a href="/ask/publish_ask.html">发起提问</a></dd>
          <dd><a href="/article/publish_article.html">发表文章</a></dd>
        </dl>
      </li>
      <template v-if="user!=''&&user!=null&&user!=undefined">
        <li class="layui-nav-item" style="float: right">
          <a href="javascript:;" style="padding: 0 20px 0 0px">
            <img :src="NGINX_SERVER+user.AVATAR" class="layui-nav-img">
            {{user.NAME}}
          </a>
          <dl class="layui-nav-child">
            <dd><a href="/user/my_home.html">我的主页</a></dd>
            <dd><a href="javascript:void(0);" style="color:red" onclick="logout()">退出登录</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item" style="float: right;margin-right: 25px;">
          <a  href="/user/my_msg.html" style="cursor: pointer;"><i class="layui-icon layui-icon-notice" style="font-size: 18px;"></i><span class="layui-badge" v-if="unreadCount>0">{{unreadCount}}</span></a>
        </li>
      </template>
      <template  v-else>
        <li style="float:right" class="layui-nav-item"><a href="/login.html">登录</a></li>
        <li style="float:right" class="layui-nav-item"><a href="/reg.html">注册</a></li>
      </template>
    </ul>
    <div class="layui-carousel" id="test1" lay-filter="test1" style="margin-top:0px;height: 500px;" >
      <div carousel-item id="img_container" >
      </div>
    </div>
  </div>

  <!-- 竞赛推荐模块-->
  <div class="sk-index-recommend-box contest layui-container" style="margin-top: 30px">
    <div class="sk-index-title contest layui-row">
      <div class="layui-col-space2">
        <h3>热门竞赛</h3>
        <a href="competition/competition.html" class="link" target="_blank">更多 &gt;&nbsp;&gt;</a>
      </div>
    </div>
    <div class="layui-row sk-index-recommend-con event clearfix">
      <template v-for="(index,i) in competitionList">
        <div class="layui-col-xs6 layui-col-md3" style="margin-top: 20px">
          <a @click="jumpCompetition(index.COMPETITION_ID)" class="item" target="_blank">
              <span class="item-img-box">

                <img :src="index.IMG_URL" >
                <span class="item-title">
                  {{index.COMPETITION_TITLE}}
                </span>
              </span>
            <span class="item-sponsor">
                主办方：{{index.ORGANISER_NAME}}
              </span>
            <span class="item-handle-box">
                <span class="item-handle-data">
                  <i class="common-icon-big item-scan-icon"></i> {{index.VIEWS}}
                </span>
                <span class="item-handle-data">
                  <i class="common-icon-big item-col-icon"></i>{{index.FOLLOWS}}
                </span>
                <span class="item-handle-data">
                  <i class="common-icon item-comment-icon"></i>{{index.COMMENTS}}
                </span>
              </span>
          </a>
        </div>
      </template>
    </div>
  </div>


  <br>
  <!-- recommend activity -->
  <div class="sk-index-recommend-box activity layui-container" style="margin-top: 10px">
      <div class="sk-index-title activity layui-row">
        <div class="layui-col-space2">
          <h3>热门活动</h3>
          <a href="activity/activity.html" class="link" target="_blank">更多 &gt;&nbsp;&gt;</a>
        </div>
      </div>
      <!--活动layui  -->
      <div class="layui-row sk-index-recommend-con event clearfix">
        <template v-for="(index,i) in activityList">
          <div class="layui-col-xs6 layui-col-md3" style="margin-top: 20px">
            <a @click="jumpActivity(index.ACTIVITY_ID)"  class="item" target="_blank">
              <span class="item-img-box" style="object-fit: cover;">

                <img :src="index.IMG_URL" >
                <span class="item-title">
                  {{index.ACT_TITLE}}
                </span>
              </span>
              <span class="item-sponsor">
                主办方：{{index.ACT_SPONSOR}}
              </span>
              <span class="item-handle-box">
                <span class="item-handle-data">
                  <i class="common-icon-big item-scan-icon"></i> {{index.VIEWS}}
                </span>
                <span class="item-handle-data">
                  <i class="common-icon-big item-col-icon"></i>{{index.FOLLOWS}}
                </span>
                <span class="item-handle-data">
                  <i class="common-icon item-comment-icon"></i>{{index.COMMENTS}}
                </span>
              </span>
            </a>
          </div>
        </template>
      </div>
    </div>

    <!-- recommend thread -->
    <div class="sk-index-recommend-box thread">
      <div class="sk-index-title thread layui-container">
        <h3>热门文章</h3>
        <a href="article/article.html" class="link" target="_blank">更多 &gt;&nbsp;&gt;</a>
      </div>
      <div class="sk-index-recommend-con thread layui-container">
        <template v-for="(index,i) in articleList" >
          <div class="item">
            <a @click="jumpArticle(index.ARTICLEMANAGEMENT_ID)" class="fl item-img-box" target="_blank">
                <img :src="NGINX_SERVER+index.IMG_URL" >
            </a>

            <dl class="fr item-info-box">
              <dt>
                <a @click="jumpArticle(index.ARTICLEMANAGEMENT_ID)" class="item-title" target="_blank">
                  {{index.ARTICLE_TITLE}} </a>
              </dt>
              <dd class="item-desc">{{index.UPDATE_TIME}}</dd>
              {{index.ARTICLE_CONTENT}}
              <dd class="clearfix">
                <div class="fl arti-author" style="margin-top:5px" >
                  <a :href="'/user/my_home.html?id='+index.USER_ID" class="link-auther-homepage" target="_blank">
                    <img :src="NGINX_SERVER+index.AVATAR" >{{index.NAME}}</a>
                  <span class="po-pa">·</span><span class="post-school">{{index.SCHOOL}}</span>
                </div>
              </dd>
            </dl>
          </div>
        </template>
      </div>
    </div>
    <div class="sk-index-partners-box">
      <div class="sk-index-title partners-contest layui-container">
        <h3>合作竞赛</h3>
      </div>
      <br>
      <div class="layui-row">
        <div class="sk-index-partners-con clearfix layui-container" >
          <div class="sk-index-title contest layui-col-xs6 layui-col-md3" style="margin-top: 20px">
            <a href="http://www.mcm.edu.cn/" class="item" title="全国大学生数学建模竞赛" target="_blank">
              <img src="static/picture/6.png" alt="全国大学生数学建模竞赛">
            </a>
          </div>
          <div class="sk-index-title contest layui-col-xs6 layui-col-md3" style="margin-top: 20px">
            <a href="http://www.chinaneccs.org/" class="item" title="全国大学生英语竞赛" target="_blank">
              <img src="static/picture/7.png" alt="全国大学生英语竞赛">
            </a>
          </div>
          <div class="sk-index-title contest layui-col-xs6 layui-col-md3" style="margin-top: 20px">
            <a href="http://zpy.cstam.org.cn" class="item" title="全国周培源大学生力学竞赛" target="_blank">
              <img src="static/picture/8.png" alt="全国周培源大学生力学竞赛">
            </a>
          </div>

          <div class="sk-index-title contest layui-col-xs6 layui-col-md3" style="margin-top: 20px">
            <a href="http://www.cmathc.cn/" class="item" title="全国大学生数学竞赛" target="_blank">
              <img src="static/picture/666.png" alt="全国大学生数学竞赛">
            </a>
          </div>
        </div>
      </div>
    </div>


  </div>

</div>

<div class="footer-wrap v-4-2">
  <div class="footer other">
    <div class="common-box footer-box">
      <div class="to-top-box" id="toUpBox">
        <!--<a href="javascript:;" target="_blank" class="common-icon-big to-feedback-btn" title="意见反馈"></a>-->
        </a>
        <div class="iradio-2 to-msite-btn to-msite-btn-2" title="微信公众号">
            <span class="weixin-box" style="margin-top: -42px;">
              <img src="/static/images/erweima.jpg" alt="微信公众号">
              <span class="weixin-txt">关注赛er订阅号</span>
              <img src="/static/images/kefu.jpg" alt="微信客服">
              <span class="weixin-txt">添加赛er客服</span>
              <span class="arrow arrow-right boxL-cor" style="margin-top: -70px;"></span>
            </span>
        </div>
        <a href="javascript:;" class="to-top-btn common-icon-big" id="toUp" title="返回顶部"></a>
      </div>
      <div class="fl ft-info-box">
        <div class="ft-tit" title="关于赛er">关于赛er</div>
        <ul class="ft-list">
          <li class="item">
            <a href="" title="了解赛er" target="_blank" rel="nofollow">了解赛er</a>
          </li>
          <li class="item">
            <a href="./contact.html" title="服务协议" target="_blank" rel="nofollow">服务协议</a>
          </li>
          <li class="item">
            <a href="" title="合作伙伴" target="_blank" rel="nofollow">合作伙伴</a>
          </li>
          <li class="item">
            <a href="" title="加入我们" target="_blank" rel="nofollow">加入我们</a>
          </li>
          <li class="item">
            <a href="" title="隐私协议" target="_blank" rel="nofollow">隐私协议</a>
          </li>
        </ul>
      </div>
      <div class="fl ft-info-box">
        <div class="ft-tit" title="帮助中心">帮助中心</div>
        <ul class="ft-list">
          <li class="item">
            <a href="" title="常见问题" target="_blank" rel="nofollow">常见问题</a>
          </li>
          <li class="item">
            <a href="./legal.html" title="社区规范" target="_blank" rel="nofollow">社区规范</a>
          </li>
          <li class="item">
            <a href="" title="意见反馈" target="_blank" rel="nofollow">意见反馈</a>
          </li>
        </ul>
      </div>
      <div class="fr ft-info-box" style="width: 200px;">
        <div class="ft-tit" title="在线客服">联系我们</div>
        <ul class="ft-list">
          <li class="item">
            赛er<span class="item-dot"></span>客服QQ：<a href="https://wpa.qq.com/msgrd?v=3&uin=412414867&site=qq&menu=yes">412414867</a>
          </li>
          <li class="item">
            赛er<span class="item-dot"></span>官方QQ群：320513949
          </li>
        </ul>
      </div>

    </div>
  </div>
  <!-- 备案 footer -->
  <div class="ft-btm">
    <div class="common-box ft-btm-box">
      <div class="btn-con">
        <span class="ft-paragraph">©<span id="nowYear"></span>赛er<span class="s-4"></span></span>
        <span><a href="https://beian.miit.gov.cn/" target="_blank" style="color: #555;">苏ICP备2021019825号</a></span>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript" src="common/common.js"></script>
<script>
  //注意：选项卡 依赖 element 模块，否则无法进行功能性操作
  layui.use('element', function() {
    var element = layui.element;

  });
  layui.use('form', function() {
    var form = layui.form;

    //监听提交
    form.on('submit(formDemo)', function(data) {
      layer.msg(JSON.stringify(data.field));
      return false;
    });
  });
  toTopFun();
</script>
<script>
  var bannerCarousel="";
  var app = new Vue({
    el:"#app",
    data:{
      user:'',
      bannerList:'',
      NGINX_SERVER:'',
      competitionList:'',
      activityList:'',
      articleList:'',
      askList:'',
      unreadCount:0,
    },
    mounted(){
      getUnreadCount(data=>{
        app.unreadCount = data;
      });
      this.user = JSON.parse(sessionStorage.getItem("userInfo"));
    },
    created() {
      //窗口变化是重新加载
      $(window).resize(function () {
        app.setBanner();
      })
      this.NGINX_SERVER = NGINX_SERVER;
      getDataByGet('api/banner/getBanner',{},function (res){
        app.bannerList = res.data;
        app.bannerList.forEach(item=>{
          $("#img_container").append("<a href='"+item.URL+"' target='_blank'><img style='width: 100%' src='"+NGINX_SERVER+item.IMG_URL+"'/></a>")
        })
        app.setBanner();
      }),
      getDataByPost('api/competition/list',{"pageSize":"8", "pageNum":"1", "category":"", "level":"","hot":"true"},function (res){
        app.competitionList=res.data.list;
        for(var i=0;i< app.competitionList.length;++i){
          app.competitionList[i].IMG_URL = NGINX_SERVER+ app.competitionList[i].IMG_URL
        }
      }),
      getDataByPost('api/activity/list',{"pageSize":"8", "pageNum":"1", "type":"", "category":"","hot":"true"},function (res){
        app.activityList=res.data.list;
        for(var i=0;i< app.activityList.length;++i){
          app.activityList[i].IMG_URL = NGINX_SERVER+ app.activityList[i].IMG_URL
        }
      }),
      getDataByPost('api/article/list',{"pageSize":"5", "pageNum":"1","hot":"true"},function (res){
        app.articleList=res.data.list;
      })
      getDataByPost('api/forum/list',{"pageSize":"5", "pageNum":"1","hot":"true"},function (res){
        app.askList=res.data.list;
      })
    },
    methods:{
      jumpArticle(id){
        window.open("article/article_detail.html?id="+id);
      },
      setBanner(){
        var b = 2000/768;//我的图片比例
        // 获取浏览器宽度
        var W = $(window).width();
        var H = $(window).height();
        layui.use('carousel', function(){
          var carousel = layui.carousel;
          //建造实例
          if(bannerCarousel==""){
            bannerCarousel = carousel.render({ elem: '#test1' ,width: '100%'
              //设置容器宽度
              ,height: (W/b).toString()+"px"
              //按比例和浏览器可视页面宽度来获取高度
              ,arrow: 'always'
              ,indicator: 'inside'    //这个属性：小圆点在外面
            });
          }else{
            bannerCarousel.reload({ elem: '#test1' ,width: '100%'
              //设置容器宽度
              ,height: (W/b).toString()+"px"
              //按比例和浏览器可视页面宽度来获取高度
              ,arrow: 'always'
              ,indicator: 'inside'    //这个属性：小圆点在外面
            });
          }
        })

      },
      jumpCompetition(id){
        window.open('competition/competition_detail.html?id='+id);
      },
      jumpActivity(id){
        window.open("activity/activity_detail.html?id="+id);
      },
    }
  })


</script>
<script>
  toTopFun();
</script>
</body>

</html>